import request from "@/utils/request";

/**
 * 查询患者信息
 * @param {*} query
 * @returns
 */
export function queryPatient(query) {
	return request({
		url: "/api/pacs/view/queryPatient",
		method: "get",
		params: query
	});
}
/**
 * 获取一个新 US(超声)检查登记
 * @param {*} query
 * @returns
 */
export function getNewExamRegisterByWorkType(workType) {
	return request({
		url: "/api/pacs/view/qNewExamRegisterByWorkType",
		method: "get",
		params: {
			workType: workType
		}
	});
}

/**
 * 超声修改备注信息
 * @param {*} query
 * @returns
 */
export function updateExamRemarkInfo(examSeq, remarkInfo) {
	return request({
		url: "/api/pacs/view/upExamRemarkInfo",
		method: "get",
		params: {
			examSeq: examSeq,
			remarkInfo: remarkInfo
		}
	});
}

/**
 * 提交PACS手动申请检查登记
 * @param {*} data
 * @returns
 */
export function addExamRegisterByPacs(data) {
	return request({
		url: "/api/pacs/view/aExamRegisterByPacs",
		method: "post",
		data
	});
}
/**
 * 提交扫描检查登记确认
 * @param {*} data
 * @returns
 */
export function commitExamRegister(data) {
	return request({
		url: "/api/pacs/view/aExamRegister",
		method: "post",
		data
	});
}
/**
 * 检查登记-上传申请单照片
 * @param {*} data
 * @returns
 */
export function uploadExamRequestImage(data) {
	return request({
		url: "/api/pacs/view/upExamRequestImage",
		method: "post",
		data
	});
}

/**
 * 检查登记-查询申请单照片
 * @param {*} examSeq
 * @returns
 */
export function getExamRequestImage(examSeq) {
	return request({
		url: "/api/pacs/view/quExamRequestImage",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 取消检查登记
 * @param {*} data
 * @returns
 */
export function commitExamRegisterCancel(examSeq) {
	return request({
		url: "/api/pacs/view/uExamRegisterCancel",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 获取一个准备修改的检查登记信息
 * @param {*} data
 * @returns
 */
export function getExamRegisterInfo(examSeq) {
	return request({
		url: "/api/pacs/view/qExamRegisterInfo",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 提交一个修改的检查登记信息
 * @param {*} data
 * @returns
 */
export function updateExamRegisterInfo(data) {
	return request({
		url: "/api/pacs/view/uExamRegisterInfo",
		method: "post",
		data
	});
}

/**
 * 根据患者ID查询master信息中患者的历次检查列表
 * @param {*} data
 * @returns
 */
export function queryPatientMasterInfoByPatId(data) {
	return request({
		url: "/api/pacs/view/queryPatientMasterInfoByPatId",
		method: "get",
		params: {
			patId: data
		}
	});
}
/**
 * 根据StudyInstanceUID查询患者本次检查下所有的序列信息表
 * @param {*} studyInstanceUID
 * @returns
 */
export function getPatientSeriesInfoListByStudyInstanceUID(studyInstanceUID) {
	return request({
		url: "/api/pacs/view/getPatientSeriesInfoListByStudyInstanceUID",
		method: "get",
		params: {
			studyInstanceUID: studyInstanceUID
		}
	});
}
/**
 * 根据StudyInstanceUID和序列号查询患者本序列号下所有的dicom文件相对路径 文件编号排序
 * @param {*} studyInstanceUID
 * @param {*} seriesNumber
 * @returns
 */
export function getAllDicomFilePathListByStudyInstanceUIDAndSeriesNumber(
	studyInstanceUID,
	seriesNumber
) {
	return request({
		url: "/api/pacs/view/getAllDicomFilePathListByStudyInstanceUIDAndSeriesNumber",
		method: "get",
		params: {
			studyInstanceUID: studyInstanceUID,
			seriesNumber: seriesNumber
		}
	});
}

/**
 * 根据StudyInstanceUID直接获取所有DICOM文件路径（批量接口，提高性能）
 * @param {*} studyInstanceUID
 * @returns
 */
export function getAllDicomFilePathListByStudyInstanceUID(studyInstanceUID) {
	return request({
		url: "/v3/api/InterfaceCommon/getAllDicomFilePathListByStudyInstanceUID",
		method: "get",
		params: {
			studyInstanceUID: studyInstanceUID
		}
	});
}

export function addPatient(data) {
	return request({
		url: "/api/pacs/view/addPatient",
		method: "post",
		data
	});
}

export function updatePatient(data) {
	return request({
		url: "/api/pacs/view/updatePatient",
		method: "put",
		data
	});
}

export function deletePatient(data) {
	return request({
		url: "/api/pacs/view/deletePatient",
		method: "post",
		params: {
			id: data
		}
	});
}

export function exportPatient(data) {
	return request({
		url: "/api/pacs/view/exportPatient",
		method: "post",
		responseType: "blob",
		data
	});
}

/**==============new============== */

/**
 * 查询检查记录基本信息显示列表
 * @param {*} query
 * @returns
 */
export function qExamMasterSimpleList(query) {
	return request({
		url: "/api/pacs/view/qExamMasterSimpleList",
		method: "get",
		params: query
	});
}

/**
 * 查询单个患者的检查详细信息
 * @param {*} data
 * @returns
 */
export function qExamMasterInfo(data) {
	return request({
		url: "/api/pacs/view/qExamMasterInfo",
		method: "get",
		params: {
			examSeq: data
		}
	});
}

/**
 * 扫码检查登记查询单个检查申请单信息
 * @param {*} data
 * @returns
 */
export function qExamRequisition(requestId, workType) {
	return request({
		url: "/api/pacs/view/qExamRequisition",
		method: "get",
		params: {
			requestId: requestId,
			workType: workType
		}
	});
}
/**
 *新版扫码获取申请单列表
 * @param {*} data
 * @returns
 */
export function getExamRequisitionLsitByWorkType(data) {
	return request({
		url: "/api/pacs/view/qExamRequisitionByWorkType",
		method: "post",
		data
	});
}
/**
 * 新版手动登记创建申请单接口
 * @param {*} data
 * @returns
 */
export function getNewExamRequisitionByWorkType(workType) {
	return request({
		url: "/api/pacs/view/qNewExamRequisitionByWorkType",
		method: "get",
		params: {
			workType: workType
		}
	});
}

/**
 * 获取单个dicom文件
 * @param {*} data
 * @returns
 */
export function fGetDicom(data) {
	return request({
		url: "/v3/api/pacs/view/fGetDicom",
		method: "get",
		params: {
			dicomPath: data
		}
	});
}

/**
 * 获取患者历史检查记录
 * @param {*} data
 * @returns
 */
export function getExamMasterSimpleListPast(examSeq) {
	return request({
		url: "/api/pacs/view/qExamMasterSimpleListPast",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 恢复取消的登记记录
 * @param {*} data
 * @returns
 */
export function recoverExamRegister(examSeq) {
	return request({
		url: "/api/pacs/view/uExamRegisterRecover",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 删除患者影像资料
 * @param {*} data
 * @returns
 */
export function delExamDicomWorkList(examSeq) {
	return request({
		url: "/api/pacs/view/delExamDicomWorkList",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 查询患者报告信息
 */
export function qetExamReportInfo(data) {
	return request({
		url: "/api/pacs/report/qExamReportInfo",
		method: "get",
		params: {
			examSeq: data
		}
	});
}
/**
 * 查询患者报告信息
 */
export function getExamReportInfoList(data) {
	return request({
		url: "/api/pacs/report/qExamReportInfoList",
		method: "get",
		params: {
			examSeq: data
		}
	});
}

/**
 * 查询报告模版类型
 */
export function qExamReportTemplateType() {
	return request({
		url: "/api/pacs/report/qExamReportTemplateType",
		method: "get"
	});
}
/**
 * 上传报告打印完成
 */
export function upExamReportPrintFlag(examSeq) {
	return request({
		url: "/v3/api/InterfaceCommon/upExamReportPrintFlag",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 查询报告模版树形菜单列表树
 */
export function qExamReportTemplate(data) {
	return request({
		url: "/api/pacs/report/qExamReportTemplate",
		method: "get",
		params: {
			examClass: data
		}
	});
}
/**
 * 查询报告模版树形菜单列表树
 */
export function getExamReportTemplateByWorkType(data) {
	return request({
		url: "/api/pacs/report/qExamReportTemplateByWorkType",
		method: "get",
		params: {
			examClass: data.examClass,
			workType: data.workType,
			userName: data.userName
		}
	});
}
/**
 * 新増报告模版
 */
export function addExamReportTemplate(data) {
	return request({
		url: "/api/pacs/report/addExamReportTemplate",
		method: "post",
		data
	});
}
/**
 * 修改报告模版
 */
export function updateExamReportTemplate(data) {
	return request({
		url: "/api/pacs/report/upExamReportTemplate",
		method: "post",
		data
	});
}
/**
 * 删除报告模版
 */
export function delExamReportTemplate(data) {
	return request({
		url: "/api/pacs/report/delExamReportTemplate",
		method: "post",
		params: {
			rtID: data
		}
	});
}
/**
 * 提交到远程会诊
 * @param {} data
 * @returns
 */
export function commitExamConsultation(examSeq) {
	return request({
		url: "/api/pacs/report/upExamConsultation",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 查询单个报告模版详细信息
 */
export function qExamReportTemplateInfo(data) {
	return request({
		url: "/api/pacs/report/qExamReportTemplateInfo",
		method: "get",
		params: {
			rtID: data
		}
	});
}

/**
 * 查询案列收藏树形列表
 */
export function getExamReportFavorites(data) {
	return request({
		url: "/api/pacs/report/qExamReportFavorites",
		method: "get",
		params: {
			userId: data
		}
	});
}
/**
 * 添加案列收藏
 */
export function insertExamReportFavorites(data) {
	return request({
		url: "/api/pacs/report/addExamReportFavorites",
		method: "post",
		data: data
	});
}
/**
 * 修改案列收藏
 */
export function updateExamReportFavorites(data) {
	return request({
		url: "/api/pacs/report/upExamReportFavorites",
		method: "post",
		data: data
	});
}
/**
 * 删除案列收藏
 */
export function delExamReportFavorites(ids) {
	return request({
		url: "/api/pacs/report/delExamReportFavorites",
		method: "post",
		params: {
			id: ids
		}
	});
}
/**
 * 新增报告
 */
export function addExamReport(data) {
	return request({
		url: "/api/pacs/report/aExamReport",
		method: "post",
		data
	});
}
/**
 * 修改报告
 */
export function updateExamReport(data) {
	return request({
		url: "/api/pacs/report/uExamReport",
		method: "post",
		data
	});
}

/**
 * 缓存报告
 */
export function autoCacheReporInfo(data) {
	return request({
		url: "/api/pacs/report/aExamReportAutoSave",
		method: "post",
		data: data
	});
}

/**
 * 缓存报告单张图片
 */
export function autoCacheReportInfoImage(data) {
	return request({
		url: "/api/pacs/report/aExamReportAutoSaveImage",
		method: "post",
		data: data
	});
}
/**
 * 提交报告并审核
 */
export function commitExamReportAndReview(data) {
	return request({
		url: "/api/pacs/report/aExamReportAndReview",
		method: "post",
		data
	});
}
/**
 * 提交终审报告
 */
export function commitFinalReviewExamReport(data) {
	return request({
		url: "/api/pacs/report/finalReviewExamReport",
		method: "post",
		data
	});
}

/**
 * 提交报告列表并审核
 */
export function commitExamReportAndReviewList(data) {
	return request({
		url: "/api/pacs/report/aExamReportAndReviewList",
		method: "post",
		data
	});
}

/**
 * 提交缓存报告列表（内镜用）
 */
export function cacheExamReportList(data) {
	return request({
		url: "/api/pacs/report/saveExamReportList",
		method: "post",
		data
	});
}

/**
 * 撤销报告
 */
export function commitExamReportCancel(examSeq) {
	return request({
		url: "/api/pacs/report/uExamReportCancel",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}
/**
 * 提交检查报告审核
 */
export function commitExamReportReview(examSeq) {
	return request({
		url: "/api/pacs/report/uExamReportReview",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}
/**
 * 撤销报告审核
 */
export function commitExamReportReviewCancel(examSeq) {
	return request({
		url: "/api/pacs/report/uExamReportReviewCancel",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 检测：检查报告-纠错检测
 */
export function checkReportContents(data) {
	return request({
		url: "/api/pacs/report/reportErrorDetection",
		method: "post",
		data: data
	});
}
/**
 * 补传报告
 */
export function uploadExamReportToPlatform(examSeq) {
	return request({
		url: "/api/pacs/report/upExamReportPlatform",
		method: "post",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 校对shi审核
 */
export function commonInterfaceUpdateExamReportTime(data) {
	return request({
		url: "/api/pacs/report/reportProofread",
		method: "post",
		data: data
	});
}

//留痕信息

/**
 * 查询患者报告修改留痕信息列表
 * @param {*} query
 * @returns
 */
export function getExamReportInfoTrace(examSeq) {
	return request({
		url: "/api/pacs/report/qExamReportInfoTrace",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}
/**
 * 术语字典查询
 */
export function qDictJargon(data) {
	return request({
		url: "/v3/api/dict/qDictJargon",
		method: "get",
		params: {
			dictId: data
		}
	});
}
/**
 * 配置项字典查询
 */
export function getSystemConfig(data) {
	return request({
		url: "/v3/api/dict/quExamConfig",
		method: "get",
		params: {
			configType: data
		}
	});
}
/**
 * 术语医生字典查询
 */
export function qDictDockerName(data) {
	return request({
		url: "/v3/api/dict/qSysUserList",
		method: "get",
		params: {
			operType: data
		}
	});
}

/**
 * 科室设备字典查询
 */
export function getDeviceDict(examClass, workType) {
	return request({
		url: "/v3/api/dict/qDictDeviceByWorkType",
		method: "get",
		params: {
			examClass: examClass,
			workType: workType
		}
	});
}
/**
 * 科室部门字典查询 spellCode：拼音码
 */
export function getBaseDept(data) {
	return request({
		url: "/v3/api/dict/quBaseDept",
		method: "get",
		params: {
			spellCode: data
		}
	});
}
/**
 * 获取科室下的人员信息
 */
export function getBasePerson(data) {
	return request({
		url: "/v3/api/dict/quBasePerson",
		method: "get",
		params: {
			officeId: data.officeId,
			officeCode: data.officeCode,
			personCode: data.personCode,
			personType: data.personType,
			keyWord: data.keyWord
		}
	});
}
/**
 * 科室设备字典查询
 */
export function getDictExamClass() {
	return request({
		url: "/v3/api/dict/qDictExamClass",
		method: "get"
	});
}
/**
 * 根据工作站类型查询科室设备字典
 */
export function getDictExamClassByWorkType(workType) {
	return request({
		url: "/v3/api/dict/qDictExamClassByWorkType",
		method: "get",
		params: {
			workType: workType
		}
	});
}

/**
 * 根据机构码和角色码获取相应的角色科室人员信息
 */
export function getDoctorByRoleCodeAndOrgCode(roleCode, orgCode) {
	return request({
		url: "/v3/api/dict/quSysUserByRole",
		method: "get",
		params: {
			roleCode: roleCode,
			orgCode: orgCode
		}
	});
}

/**
 * 获取申请医生手机信息（发送危急值用）
 */
export function getCriticalMobiles() {
	return request({
		url: "/v3/api/dict/qCriticalMobiles",
		method: "get"
	});
}
/**
 * 危急模版添加
 */
export function addCriticalTemplate(data) {
	return request({
		url: "/v3/api/dict/addPublicTemplate",
		method: "post",
		data
	});
}
/**
 * 危急模版修改
 */
export function updateCriticalTemplate(data) {
	return request({
		url: "/v3/api/dict/updatePublicTemplate",
		method: "post",
		data
	});
}
/**
 * 删除危急值模版
 */
export function delCriticalTemplate(id) {
	return request({
		url: "/v3/api/dict/deletePublicTemplate",
		method: "get",
		params: {
			id: id
		}
	});
}

/**
 * 查询定制模板
 */
export function getCustomTemplate(data) {
	return request({
		url: "/v3/api/dict/qQueryTemplate",
		method: "get",
		params: {
			userCode: data.userCode,
			templateType: data.templateType
		}
	});
}
/**
 * 定制模板添加
 */
export function addCustomTemplate(data) {
	return request({
		url: "/v3/api/dict/saveQueryTemplate",
		method: "post",
		data
	});
}
/**
 * 定制查询模板删除
 */
export function delCustomTemplate(id) {
	return request({
		url: "/v3/api/dict/delQueryTemplate",
		method: "get",
		params: {
			id: id
		}
	});
}

//===================采集=======================//
/**
 * 请求采集设备绑定
 */
export function startDeviceBindingExamInfo(data) {
	return request({
		url: "/api/pacs/acq/uDeviceBindingExamInfo",
		method: "post",
		data
	});
}
/**
 * 请求采集图像
 */
export function getACQImages(examSeq) {
	return request({
		url: "/api/pacs/acq/qGetACQImage",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}
/**
 * 删除采集图像
 */
export function delACQImage(data) {
	return request({
		url: "/api/pacs/acq/delACQImage",
		method: "post",
		data
	});
}
/**
 * 粘贴采集图像
 */
export function pasteACQImage(data) {
	return request({
		url: "/api/pacs/acq/pasteACQImage",
		method: "post",
		data
	});
}
/**
 * 粘贴采集图像
 */
export function restoreACQImage(examSeq) {
	return request({
		url: "/api/pacs/acq/recoverACQImage",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 询单个患者的检查dicom影像文件地址列表
 */
export function getExamDicomUrl(data) {
	return request({
		url: "/api/pacs/view/qExamDicomUrl",
		method: "get",
		params: {
			studyInstanceUid: data
		}
	});
}

/**
 * 阳性率统计
 */
export function getDataPositive(data) {
	return request({
		url: "/api/pacs/pacsStatistics/dataPositive",
		method: "post",
		data
	});
}
/**
 * 危急值统计
 */
export function statictisExamReportCritical(data) {
	return request({
		url: "/api/pacs/pacsStatistics/dataExamReportCritical",
		method: "post",
		data
	});
}
/**
 * 质控统计：随访记录
 */
export function examFollowupQCStatisticsPublic(data) {
	return request({
		url: "/api/pacs/pacsStatistics/examFollowupQCStatisticsPublic",
		method: "post",
		data
	});
}
/**
 * 内镜质控指标统计
 */
export function getQCStatisticsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataQCStatisticsES",
		method: "post",
		data
	});
}
/**
 * 内镜质控指标统计 导出Excel
 * @param {*} data
 * @returns
 */
export function workDataQCStatisticsESExport(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataQCStatisticsESExport",
		method: "post",
		responseType: "blob",
		data
	});
}
/**
 * 超声质控区域指标
 */
export function areaIndicatorsQCStatisticsUS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/areaIndicatorsQCStatisticsUS",
		method: "post",
		data
	});
}

//===================排队叫号=======================//

/**
 * 据检显示类型、检查诊室类别 查询 待检查患者队列列表
 */
export function qExamWaitLineListUS(data) {
	return request({
		url: "/v3/api/calling/qExamWaitLineListUS",
		method: "get",
		params: {
			examClass: data.examClass,
			examName: data.examName
		}
	});
}

/**
 * 据检显示类型、检查诊室类别 查询 待检查患者队列列表
 */
export function getExamWaitLineListByWorkType(data) {
	return request({
		url: "/v3/api/calling/qExamWaitLineListByWorkType",
		method: "get",
		params: {
			examExecuteDevice: data.examExecuteDevice,
			workType: data.workType
		}
	});
}

/**
 * 提交呼叫信息
 */
export function commitExamRoomCallingMessage(callingMessage, examExecuteDevice) {
	return request({
		url: "/v3/api/calling/upExamRoomCallingMessage",
		method: "get",
		params: {
			callingMessage: callingMessage,
			examExecuteDevice: examExecuteDevice
		}
	});
}
/**
 * 提交过号信息
 */
export function commitExamPassCallUS(data) {
	return request({
		url: "/v3/api/calling/uExamPassCallUS",
		method: "get",
		params: {
			examSeq: data
		}
	});
}
/**
 * 重新排队，给一个患者重新分配最新排队号码
 */
export function refreshExamRegisterInfoWaitNo(examSeq) {
	return request({
		url: "/v3/api/calling/uExamRegisterInfoWaitNo",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**
 * 获取通用检查项目字典列表
 */
export function getDictExamItem(data) {
	return request({
		url: "/v3/api/dict/qDictExamItemByWorkType",
		method: "get",
		params: {
			examClass: data.examClass,
			keyWord: data.keyWord,
			workType: data.workType
		}
	});
}

//===================对外第三方提供信息接口=======================//

/**
 * 查询单个患者的检查详细信息 用于第三方查询检查记录和报告查询 examSeq 检查序列号(对应dicom的SEQ)
 */
export function getExamMasterInfo(data) {
	return request({
		url: "/v3/api/InterfaceCommon/qExamMasterInfo",
		method: "get",
		params: {
			examSeq: data
		}
	});
}

/**
 * 查询单个患者的检查记录，用于第三方查询患者检查历史记录，sourcePatientId 患者id
 */
export function getExamMasterRecord(data) {
	return request({
		url: "/v3/api/InterfaceCommon/qExamMasterRecord",
		method: "get",
		params: {
			examStartDateTime: data.examStartDateTime,
			examEndDateTime: data.examEndDateTime,
			requestDeptName: data.requestDeptName,
			patName: data.patName,
			examSeq: data.examSeq,
			requestId: data.requestId,
			hospizationId: data.hospizationId,
			clinicId: data.clinicId,
			idCard: data.idCard,
			dataType: data.dataType
		}
	});
}

/**
 * 查询单个患者的报告信息，提供给第三方的公共接口信息
 */
export function getCommonInterfaceExamReportInfo(data) {
	return request({
		url: "/v3/api/InterfaceCommon/qExamReportInfo",
		method: "get",
		params: {
			examSeq: data
		}
	});
}
/**
 * 根据StudyInstanceUID查询患者本次检查下所有的序列信息表----用于第三方阅片
 * @param {*} studyInstanceUID
 * @returns
 */
export function getCommonInterfacePatientSeriesInfoListByStudyInstanceUID(
	studyInstanceUID
) {
	return request({
		url: "/v3/api/InterfaceCommon/getPatientSeriesInfoListByStudyInstanceUID",
		method: "get",
		params: {
			studyInstanceUID: studyInstanceUID
		}
	});
}

//-------------危急值信息发布----------------//

/**
 * 获取危急值描述模板树
 */
export function publicQueryTemplate(data) {
	return request({
		url: "/v3/api/dict/quPublicTemplate",
		method: "get",
		params: {
			workType: data.workType,
			templateType: data.templateType,
			createUserCode: data.createUserCode,
			keyWord: data.keyWord
		}
	});
}

/**
 * 查询检查报告-危急值记录
 */
export function getExamReportCritical(data) {
	return request({
		url: "/api/pacs/report/qExamReportCritical",
		method: "get",
		params: {
			examSeq: data
		}
	});
}
/**
 * 新增检查报告-危急值记录
 *
 * */
export function saveExamReportCritical(data) {
	return request({
		url: "/api/pacs/report/addExamReportCritical",
		method: "post",
		data: data
	});
}

/**
 * 修改检查报告-危急值记录
 *
 * */
export function upDateExamReportCritical(data) {
	return request({
		url: "/api/pacs/report/upExamReportCritical",
		method: "post",
		data: data
	});
}

/**
 * 撤销检查报告-危急值记录
 *
 * */
export function deleteDateExamReportCritical(id) {
	return request({
		url: "/api/pacs/report/delExamReportCritical",
		method: "post",
		params: {
			criticalId: id
		}
	});
}
export function pacsReportlmagePartUS() {
	return request({
		url: "/api/pacs/ReportlmagePartUS",
		method: "get"
	});
}

//工作量 混合报表-申请科室
export function workDataByRequestDept(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByRequestDept",
		method: "post",
		data
	});
}
//工作量 混合报表-申请医生
export function pacsStatisticsworkDataByRequestDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByRequestDoctor",
		method: "post",
		data: data
	});
}
//工作量 混合报表-申请医生 导出
export function workDataByRequestDoctorExport(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByRequestDoctorExport",
		method: "post",
		data: data
	});
}
//工作量 混合报表-登记医生
export function pacsStatisticsworkDataByTriageDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByTriageDoctor",
		method: "post",
		data: data
	});
}
//工作量 混合报表-报告医生
export function workDataByReportDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByReportDoctor",
		method: "post",
		data: data
	});
}
//工作量 混合报表-审核医生
export function workDataByReviewDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataByReviewDoctor",
		method: "post",
		data
	});
}
//工作量 混合报表-诊室
export function workExaminationRoom(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workExaminationRoom",
		method: "post",
		data: data
	});
}

//工作量 混合报表-技师
export function pacsStatisticsWorkDataByExecutiveDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workDataTechnician",
		method: "post",
		data: data
	});
}

// 工作量 混合报表-记录员
export function workRecorderByDoctor(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workRecorderByDocker",
		method: "post",
		data: data
	});
}
// 工作量 设备分析-检查设备
export function workInspectEquipment(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workInspectEquipment",
		method: "post",
		data: data
	});
}
// 工作量 部位分析-检查部位
export function workCheckpoint(data) {
	return request({
		url: "/api/pacs/pacsStatistics/workCheckpoint",
		method: "post",
		data: data
	});
}
// 数据中心 质控统计-检查质控(检查效率)
export function examQCStatisticsPublic(data) {
	return request({
		url: "/api/pacs/pacsStatistics/examQCStatisticsPublic",
		method: "post",
		data: data
	});
}
// 数据中心 质控统计-检查质控(检查效率)-急诊报告时限符合率
export function jzReportTimeRatePublic(data) {
	return request({
		url: "/api/pacs/pacsStatistics/jzReportTimeRatePublic",
		method: "post",
		data: data
	});
}
// 数据中心 质控统计-报告质控(报告评价)
export function reportQCStatisticsPublic(data) {
	return request({
		url: "/api/pacs/pacsStatistics/reportQCStatisticsPublic",
		method: "post",
		data: data
	});
}
// 数据中心 质控统计-影像质控(影像评价)
export function imageQCStatisticsPublic(data) {
	return request({
		url: "/api/pacs/pacsStatistics/imageQCStatisticsPublic",
		method: "post",
		data: data
	});
}
/**=====================内镜专用统计api==================== */
// 数据中心 内镜专用统计-内镜质量指标
export function qualityIndicatorsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/qualityIndicatorsES",
		method: "post",
		data: data
	});
}
// 数据中心 内镜专用统计-内窥镜检查项目汇总
export function examItemStatisticsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/examItemStatisticsES",
		method: "post",
		data: data
	});
}
// 数据中心 内镜专用统计-内镜患者信息统计
export function patInfoStatisticsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/patInfoStatisticsES",
		method: "post",
		data: data
	});
}
// 数据中心 内镜专用统计-医生工作量统计
export function doctorWorkStatisticsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/doctorWorkStatisticsES",
		method: "post",
		data: data
	});
}
// 数据中心 内镜专用统计-申请科室汇总
export function requestDeptStatisticsES(data) {
	return request({
		url: "/api/pacs/pacsStatistics/requestDeptStatisticsES",
		method: "post",
		data: data
	});
}
/**=====================内镜专用统计api==================== */

/**=====================超声专用统计api==================== */
// 数据中心 超声专用统计-超声质控专项指标
export function specialIndicatorsQCStatisticsUS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/specialIndicatorsQCStatisticsUS",
		method: "post",
		data: data
	});
}
/**=====================超声专用统计api==================== */

/**=====================放射专用统计api==================== */
// 数据中心 放射专用统计-放射阳性率统计
export function positivePercentStatisticsFS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/positivePercentStatisticsFS",
		method: "post",
		data: data
	});
}
// 数据中心 放射专用统计-放射报告分级统计
export function reportIntegralStatisticsFS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/reportIntegralStatisticsFS",
		method: "post",
		data: data
	});
}
// 数据中心 放射专用统计-放射报告工作积分统计
export function reportWorkIntegralStatisticsFS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/reportWorkIntegralStatisticsFS",
		method: "post",
		data: data
	});
}
// 数据中心 放射专用统计-放射影像质控统计
export function imageQCStatisticsFS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/imageQCStatisticsFS",
		method: "post",
		data: data
	});
}
// 数据中心 放射专用统计-放射报告质控统计
export function reportQCStatisticsFS(data) {
	return request({
		url: "/api/pacs/pacsStatistics/reportQCStatisticsFS",
		method: "post",
		data: data
	});
}
/**=====================放射专用统计api==================== */
/**
 * 质控查询
 */
export function qExamQualityControl(data) {
	return request({
		url: "/api/pacs/report/qExamQualityControl",
		method: "get",
		params: {
			examSeq: data
		}
	});
}
/**
 * 质控修改
 */
export function upExamQualityControl(data) {
	return request({
		url: "/api/pacs/report/upExamQualityControl",
		method: "post",
		data: data
	});
}
/**
 * 随访修改
 */
export function upExamFollowFlagMark(data) {
	return request({
		url: "/api/pacs/report/upExamFollowFlag",
		method: "get",
		params: {
			examSeq: data.examSeq,
			isFollow: data.isFollow
		}
	});
}
/**
 *检查报告-锁定功能
 */
export function upExamReportLock(data) {
	return request({
		url: "/api/pacs/report/upExamReportLock",
		method: "get",
		params: {
			examSeq: data.examSeq,
			reportLockUserCode: data.userCode,
			isReportLock: data.isReportLock
		}
	});
}

/**
 * 数据中心-超声统计-更换科室
 */
export function upExamClass(data) {
	return request({
		url: "/api/pacs/pacsStatistics/upExamClass",
		method: "get",
		params: {
			examSeq: data.examSeq,
			examClass: data.examClass
		}
	});
}

/**=====================签到列表api==================== */

/**获取签到列表 */
export function getRequisitionAppointmentSignInList(workType) {
	return request({
		url: "/api/pacs/view/quRequisitionAppointmentSignInList",
		method: "get",
		params: {
			workType: workType
		}
	});
}
/**修改 studyInstanceUid：检查设备实列UID */
export function updateStudyInstanceUid(data) {
	return request({
		url: "/api/pacs/view/upStudyInstanceUid",
		method: "get",
		params: {
			examSeq: data.examSeq,
			studyInstanceUid: data.studyInstanceUid
		}
	});
}

/**=====================随访api==================== */
/**新增随访 */
export function postAddExamFollowup(data) {
	return request({
		url: "/api/pacs/report/addExamFollowup",
		method: "post",
		data
	});
}

/**查询随访 */
export function getqExamFollowup(examSeq) {
	return request({
		url: "/api/pacs/report/qExamFollowup",
		method: "get",
		params: {
			examSeq: examSeq
		}
	});
}

/**修改随访 */
export function getupExamFollowup(data) {
	return request({
		url: "/api/pacs/report/upExamFollowup",
		method: "post",
		data
	});
}

/**修改随访 */
export function uploadRegistrationImgFile(data) {
	return request({
		url: "/api/file/uploadFileBase64",
		method: "post",
		data
	});
}

/** 设备管理接口 */

export function queryTerminal(data) {
	return request({
		url: "/api/pacs/test/queryTerminal",
		method: "get",
		data
	});
}

export function addTerminal(data) {
	return request({
		url: "/api/pacs/eqm/terminal/addTerminal",
		method: "post",
		data
	});
}

export function updateTerminal(data) {
	return request({
		url: "/api/pacs/eqm/terminal/updateTerminal",
		method: "put",
		data
	});
}

export function deleteTerminal(data) {
	return request({
		url: "/api/pacs/eqm/terminal/deleteTerminal",
		method: "post",
		params: {
			id: data
		}
	});
}

export function exportTerminal(data) {
	return request({
		url: "/api/pacs/eqm/terminal/exportTerminal",
		method: "post",
		responseType: "blob",
		data
	});
}
